package com.dataStructure.集合;

import org.junit.jupiter.api.Test;

public class zTestSet {
    @Test
    public void test1(){
        TreeSet<Integer> treeSet = new TreeSet<>();
        treeSet.add(12);
        treeSet.add(10);
        treeSet.add(11);
        treeSet.add(10);
        treeSet.add(11);
        treeSet.traversal(new Set.Visitor<Integer>() {
            @Override
            public boolean visit(Integer element) {
                System.out.println(element);
                return false;
            }
        });
    }
}
